<% user_id ||= session[:user_id] %>

<table class="occasion_box">
  <tr>
    <th>お祝いイベント名</th>
    <td width="50%">
      <% if show_favorite %>
        <% participation = occasion.occasion_participations.first %>
        <% elem_id = "occasion_participation_#{participation.id}" %>
        <span id="<%= elem_id %>"><%= render :partial => "favorite", :locals => { :oid => occasion.oid, :participation => participation, :update_elem_id => elem_id } %></span>
      <% end %>
      <%= occasion_link_to occasion %>
    </td>
    <td class="auth" width="30%"><%= participation_state(occasion, user_id) -%></td>
    <td class="category">
      <%= icon_tag(occasion.category_icon_name.first, :title => occasion.category_icon_name.last, :margin => true) + occasion.category_icon_name.last %>
    </td>
  </tr>
  <tr>
    <th>説明</th>
    <td colspan="3" class="desc"><div style="overflow: auto; height: 80px; width: 100%;"><div class="hiki_style"><%= hiki_parse(occasion.description, occasion.symbol) %></div></div></td>
  </tr>
  <tr>
    <td></td>
    <td style="font-size:10px"><%= '※参加には承認が必要' if occasion.protected? -%></td>
    <td colspan="2" class="since">since <%= occasion.created_on.strftime("%Y/%m/%d") -%></td>
  </tr>
</table>
